package tongwentongshu.com.app.adapter;


import android.content.Context;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

import tongwentongshu.com.app.R;
import tongwentongshu.com.app.bean.MyFollowBean;
import tongwentongshu.com.app.bean.MyShareBean;
import tongwentongshu.com.app.utils.GlideUtil;
import tongwentongshu.com.app.view.RoundImageView;

/**
 * 文 件 名: MainBooksAdapter
 * 创 建 人: Allen
 * 创建日期: 16/12/24 19:55
 * 邮   箱: AllenCoder@126.com
 * 修改时间：
 * 修改备注：
 */
public class MyFollowAdapter extends BaseQuickAdapter<MyFollowBean.DataBean, BaseViewHolder> {
    private Context mContext;

    public MyFollowAdapter(Context mContext, List<MyFollowBean.DataBean> list) {
        super(R.layout.view_my_follow, list);
        this.mContext = mContext;
    }

    @Override
    protected void convert(BaseViewHolder helper, MyFollowBean.DataBean item) {
        helper.setText(R.id.tv_user_name, item.getUser_nickname());
        helper.setText(R.id.tv_user_info, item.getShare_book_num() + "次分享/" + item.getRead_book_num() + "次阅读");
        GlideUtil.setImage(mContext, item.getAvatar(), R.drawable.default_graph, R.drawable.default_graph, (ImageView) helper.getView(R.id.iv_user_image));
    }


}
